package org.microdream.easy.deploy.po;

import ice.server.comm.PoExtender;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "d_org", schema = "easydeploy", catalog = "")
public class DOrg  extends PoExtender implements Serializable {
    private static final long serialVersionUID = 1L;
    private int id;
    private String orgName;
    private String rentCode;
    private String orgUser;
    private String orgPhone;
    private String orgAddress;
    private String orgCode;
    private String orgFCode;
    private String updateUser;
    private Timestamp updateTime;
    private Integer isDelete;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Basic
    @Column(name = "rent_code")
    public String getRentCode() {
        return rentCode;
    }

    public void setRentCode(String rentCode) {
        this.rentCode = rentCode;
    }

    @Basic
    @Column(name = "org_user")
    public String getOrgUser() {
        return orgUser;
    }

    public void setOrgUser(String orgUser) {
        this.orgUser = orgUser;
    }

    @Basic
    @Column(name = "org_phone")
    public String getOrgPhone() {
        return orgPhone;
    }

    public void setOrgPhone(String orgPhone) {
        this.orgPhone = orgPhone;
    }

    @Basic
    @Column(name = "org_address")
    public String getOrgAddress() {
        return orgAddress;
    }

    public void setOrgAddress(String orgAddress) {
        this.orgAddress = orgAddress;
    }

    @Basic
    @Column(name = "org_code")
    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    @Basic
    @Column(name = "org_f_code")
    public String getOrgFCode() {
        return orgFCode;
    }

    public void setOrgFCode(String orgFCode) {
        this.orgFCode = orgFCode;
    }

    @Basic
    @Column(name = "update_user")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DOrg dOrg = (DOrg) o;
        return id == dOrg.id &&
                Objects.equals(orgName, dOrg.orgName) &&
                Objects.equals(rentCode, dOrg.rentCode) &&
                Objects.equals(orgUser, dOrg.orgUser) &&
                Objects.equals(orgPhone, dOrg.orgPhone) &&
                Objects.equals(orgAddress, dOrg.orgAddress) &&
                Objects.equals(orgCode, dOrg.orgCode) &&
                Objects.equals(orgFCode, dOrg.orgFCode) &&
                Objects.equals(updateUser, dOrg.updateUser) &&
                Objects.equals(updateTime, dOrg.updateTime) &&
                Objects.equals(isDelete, dOrg.isDelete);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, orgName, rentCode, orgUser, orgPhone, orgAddress, orgCode, orgFCode, updateUser, updateTime, isDelete);
    }
}
